<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script src="https://unpkg.com/shapefile@0.6.6/dist/shapefile.js"></script>
  <script>
  shapefile.open("./data/canyin.shp")
    .then(source => source.read()
      .then(function log(result) {
        if (result.done) return;
        console.log(result.value);
        return source.read().then(log);
      }))
    .catch(error => console.error(error.stack));
  </script>
</body>
</html>